3.2 \(\int \cot ^2(a+b x) \, dx\)

Optimal. Leaf size=15 \[ -\frac{\cot (a+b x)}{b}-x \]

[Out]

-x - Cot[a + b*x]/b

________________________________________________________________________________________

Rubi [A]  time = 0.0087821, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3473, 8} \[ -\frac{\cot (a+b x)}{b}-x \]

Antiderivative was successfully verified.

[In]

Int[Cot[a + b*x]^2,x]

[Out]

-x - Cot[a + b*x]/b

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \cot ^2(a+b x) \, dx &=-\frac{\cot (a+b x)}{b}-\int 1 \, dx\\ &=-x-\frac{\cot (a+b x)}{b}\\ \end{align*}

Mathematica [C]  time = 0.0146062, size = 29, normalized size = 1.93 \[ -\frac{\cot (a+b x) \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},-\tan ^2(a+b x)\right )}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[a + b*x]^2,x]

[Out]

-((Cot[a + b*x]*Hypergeometric2F1[-1/2, 1, 1/2, -Tan[a + b*x]^2])/b)

________________________________________________________________________________________

Maple [A]  time = 0.015, size = 26, normalized size = 1.7 \begin{align*}{\frac{1}{b} \left ( -\cot \left ( bx+a \right ) +{\frac{\pi }{2}}-{\rm arccot} \left (\cot \left ( bx+a \right ) \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(b*x+a)^2,x)

[Out]

1/b*(-cot(b*x+a)+1/2*Pi-arccot(cot(b*x+a)))

________________________________________________________________________________________

Maxima [A]  time = 1.48801, size = 24, normalized size = 1.6 \begin{align*} -\frac{b x + a + \frac{1}{\tan \left (b x + a\right )}}{b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(b*x+a)^2,x, algorithm="maxima")

[Out]

-(b*x + a + 1/tan(b*x + a))/b

________________________________________________________________________________________

Fricas [B]  time = 1.73378, size = 93, normalized size = 6.2 \begin{align*} -\frac{b x \sin \left (2 \, b x + 2 \, a\right ) + \cos \left (2 \, b x + 2 \, a\right ) + 1}{b \sin \left (2 \, b x + 2 \, a\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(b*x+a)^2,x, algorithm="fricas")

[Out]

-(b*x*sin(2*b*x + 2*a) + cos(2*b*x + 2*a) + 1)/(b*sin(2*b*x + 2*a))

________________________________________________________________________________________

Sympy [A]  time = 0.138366, size = 17, normalized size = 1.13 \begin{align*} \begin{cases} - x - \frac{\cot{\left (a + b x \right )}}{b} & \text{for}\: b \neq 0 \\x \cot ^{2}{\left (a \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(b*x+a)**2,x)

[Out]

Piecewise((-x - cot(a + b*x)/b, Ne(b, 0)), (x*cot(a)**2, True))

________________________________________________________________________________________

Giac [B]  time = 1.11432, size = 47, normalized size = 3.13 \begin{align*} -\frac{2 \, b x + 2 \, a + \frac{1}{\tan \left (\frac{1}{2} \, b x + \frac{1}{2} \, a\right )} - \tan \left (\frac{1}{2} \, b x + \frac{1}{2} \, a\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(b*x+a)^2,x, algorithm="giac")

[Out]

-1/2*(2*b*x + 2*a + 1/tan(1/2*b*x + 1/2*a) - tan(1/2*b*x + 1/2*a))/b